package ve.ejb.metadata;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author memozac
 */
@Entity
public class ColorimetryStandardColor implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long idColorimetryStandardSettings;

    @ManyToOne
    @JoinColumn(name="idColor",nullable=false,updatable=true)
    private Color color;

    @ManyToOne
    @JoinColumn(name="idColorimetryStandard",nullable=false,updatable=true)
    private ColorimetryStandard colorimetryStandard;

    @Temporal(value = TemporalType.TIMESTAMP) private Date registerDate;
    
    private Double maxScore; // <=

    private Double minScore; // >

    public Double getMaxScore() {
        return maxScore;
    }

    public void setMaxScore(Double maxScore) {
        this.maxScore = maxScore;
    }

    public Double getMinScore() {
        return minScore;
    }

    public void setMinScore(Double minScore) {
        this.minScore = minScore;
    }
    public Date getRegisterDate() {
        return registerDate;
    }

    public void setRegisterDate(Date registerDate) {
        this.registerDate = registerDate;
    }

    public Long getIdMapSettings() {
        return idColorimetryStandardSettings;
    }

    public ColorimetryStandard getColorimetryStandard() {
        return colorimetryStandard;
    }

    public void setColorimetryStandard(ColorimetryStandard colorimetryStandard) {
        this.colorimetryStandard = colorimetryStandard;
    }

    public Long getIdColorimetryStandardSettings() {
        return idColorimetryStandardSettings;
    }

    public void setIdColorimetryStandardSettings(Long idColorimetryStandardSettings) {
        this.idColorimetryStandardSettings = idColorimetryStandardSettings;
    }

    public Color getColor() {
        return color;
    }

    public void setColor(Color color) {
        this.color = color;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idColorimetryStandardSettings != null ? idColorimetryStandardSettings.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        if (!(object instanceof ColorimetryStandardColor)) {
            return false;
        }
        ColorimetryStandardColor other = (ColorimetryStandardColor) object;
        if ((this.idColorimetryStandardSettings == null && other.idColorimetryStandardSettings != null) || (this.idColorimetryStandardSettings != null && !this.idColorimetryStandardSettings.equals(other.idColorimetryStandardSettings))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "ve.ejb.entity.ColorimetryStandardSettings[id=" + idColorimetryStandardSettings + "]";
    }

}//ends of class